package com.fay.designPattern.pattern.create.singleton.u42;

/**
 * @Title:
 * @Description:
 * @Author Fay Wang
 * @Date 2022/4/9 10:32
 * @Version 1.0
 */
public class Singleton1 {
    private static Singleton1 instance = null;
    private  final int paramA;
    private  final int paramB;

    private Singleton1() {
        this.paramA = Config.PARAM_A;
        this.paramB = Config.PARAM_B;
    }

    public synchronized static Singleton1 getInstance() {
        if (instance == null) {
            instance = new Singleton1();
        }
        return instance;
    }
}
